
package com.epam.android.training.day10.task1;

import android.net.Uri;
import android.provider.BaseColumns;

/**
 * Convenience definitions for {@link ContactsProvider}.
 * 
 * @author Anton Novikov
 */
public final class Contacts {

  public static final String AUTHORITY = "com.epam.android.training.day10.task1.Contacts";

  // This class cannot be instantiated
  private Contacts() {}

  /**
   * Table with contact's personal data.
   * 
   * @author Anton Novikau
   */
  public static final class PersonalData implements BaseColumns {

    // This class cannot be instantiated
    private PersonalData() {}

    /**
     * The content:// style URL for this table
     */
    public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/data");

    /**
     * The MIME type of {@link #CONTENT_URI} providing a directory of contacts.
     */
    public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.epam.contact.data";

    /**
     * The MIME type of {@link #CONTENT_URI} providing a single contact data.
     */
    public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.epam.contact.item";

    /**
     * The default sort order for this table
     */
    public static final String DEFAULT_SORT_ORDER = "first_name ASC";

    /**
     * The first name of a contact
     * <P>
     * Type: TEXT
     * </P>
     */
    public static final String FIRST_NAME = "first_name";

    /**
     * The last name of a contact
     * <P>
     * Type: TEXT
     * </P>
     */
    public static final String LAST_NAME = "last_name";

    /**
     * The age of a contact
     * <P>
     * Type: INTEGER
     * </P>
     */
    public static final String AGE = "age";
  }
}
